home *** CD-ROM | disk | FTP | other *** search
/ F1 Licenseware / F1 Licenseware - Volume 1.iso / disks / 050a.dms / 050a.adf / EXAMPLE_PROGRAMS / example16.AMOS / example16.amosSourceCode
AMOS Source Code  |  1992-02-26  |  1KB  |  60 lines

  1. '===================== 
  2. 'eaxmple16.Amos
  3. '===================== 
  4.  
  5. 'demonstration of a few system commands introduced in chapter 16 
  6. 'I have not commented on parts you should easily understand. 
  7.  
  8. Flash Off : Curs Off : Hide : Paper 0 : Cls 0
  9.  
  10. Rem This executes a little subroutine that displays the current memory 
  11. Rem available. It's in a subroutine as we are going to use it more than
  12. Rem once in this program.
  13. '----------------------------------------------------------------------- 
  14. Gosub PM
  15.  
  16. Wait 100
  17.  
  18. Pen 4
  19. Print 
  20. Print "NOW CLOSING WORKBENCH AND EDITOR"
  21.  
  22. Wait 100
  23.  
  24. Close Workbench 
  25. Close Editor 
  26.  
  27. Pen 5
  28. Gosub PM
  29.  
  30. Wait 100
  31.  
  32. Pen 6
  33. Print : Print "NOW DISABLING BREAK KEY," : Print "TRY PRESSING CTRL+C "
  34. Pen 7
  35. Print : Print "CLICK MOUSE WHEN READY TO CONTINUE"
  36.  
  37. Break Off 
  38.  
  39. While Mouse Key=0 : Wend 
  40.  
  41. Pen 13
  42. Print : Print "NOW RESETTING AMOS TO DEFAULT"
  43. Wait 100
  44.  
  45. Default 
  46.  
  47. Rem I have put the STOP here otherwise the program will run past here and
  48. Rem execute the PM subroutine an extra time, not fatal but untidy. 
  49. '--------------------------------------------------------------------------
  50. Stop 
  51.  
  52.  
  53. Rem This is a little subroutine that gets all available memory 
  54. Rem CHIP and FAST ram and adds them together. MEM then equals total memory 
  55. Rem available which is printed and a K is stuck on the end for good measure. 
  56. '--------------------------------------------------------------------------- 
  57. PM:
  58. MEM=Chip Free+Fast Free
  59. Print : Print "CURRENT MEMORY (CHIP+FAST) =";MEM;"K"
  60. Return